﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccessLayer;
using Entities;

namespace BusinessLogicLayer
{
    public class PhieuNhapBO
    {
        private PhieuNhapDAL dal;
        
        public PhieuNhapBO()
        {
            try
            {
                dal = new PhieuNhapDAL();
            }
            catch (Exception e)
            {
                //throw new BusinessLogicException();
            }
        }
        public String GetLastID()
        {
            String kq = null;
            try
            {
                kq = dal.GetLastID();
            }
            catch (Exception)
            {
                return kq;
                throw;
            }
            return kq;
        }
        public int InsertPhieuNhap(PhieuNhap pn)
        {
            int kq = 0;
            try
            {
                kq = dal.InsertPhieuNhap(pn);
            }
            catch (Exception)
            {
                return kq;
                throw;
            }
            return kq;
        }
        public int DeletePhieuNhap(int maPhieuNhap)
        {
            int kq = 0;
            try
            {
                kq = dal.DeletePhieuNhap(maPhieuNhap);
            }
            catch (Exception)
            {
                return kq;
                throw;
            }
            return kq;
        }
    }
}
